<!DOCTYPE html>
<html ng-app="myApp" ng-controller="findController">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - 表单向导</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="../css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="../css/animate.css" rel="stylesheet">
    <link href="../css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>请填写故障查询条件</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_wizard.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <li><a href="form_wizard.html#">选项1</a>
                            </li>
                            <li><a href="form_wizard.html#">选项2</a>
                            </li>
                        </ul>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form id="form">

                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label>故障名称</label>
                                    <input type="text" class="form-control " ng-model="find.title" id="title">
                                </div>
                                <div class="form-group">
                                    <label>故障编号</label>
                                    <input  type="text" class="form-control " ng-model="find.number" id="number">
                                </div>

                                <div class="form-group">
                                    <label>故障部位</label>
                                    <input  type="text" class="form-control " ng-model="find.location" >
                                </div>

                                <div class="form-group">
                                    <label>开始时间</label>
                                    <div >
                                        <input ng-model="find.beginTime" class="layer-date" id="beginTime" placeholder="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" style="padding:7px 12px;  width: 230px">
                                        <label class="laydate-icon" onclick="laydate({elem: '#beginTime'});"></label>
                                    </div>
                                </div>



                            </div>




                            <div class="col-sm-6">


                                <div class="form-group">
                                    <label>故障机床所在工厂</label>
                                    <input type="text" class="form-control " ng-model="find.factory" id="factory">
                                </div>

                                <div class="form-group">
                                    <label>故障机床厂家型号</label>
                                    <input   type="text" class="form-control " ng-model="find.machine_type" id="machine_type">
                                </div>


                                <div class="form-group">
                                    <label>故障关键字</label>
                                    <input  type="text" class="form-control " ng-model="find.description" >
                                </div>


                                <div class="form-group">
                                    <label>结束时间</label>
                                    <div >
                                        <input ng-model="find.endTime" class="layer-date" id="endTime" placeholder="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" style="padding:7px 12px;  width: 230px">
                                        <label class="laydate-icon" onclick="laydate({elem: '#endTime'});"></label>
                                    </div>
                                </div>
                            </div>

                        </div>






                    </form>


                    <button class="btn btn-primary" ng-click="findFault()">查询</button>



                </div>
            </div>
        </div>

    </div>
</div>

<div class="wrapper wrapper-content animated fadeInUp" ng-show="faults.length > 0">
    <div class="row">
        <div class="col-sm-12">

            <div class="ibox">
                <div class="ibox-title">
                    <h5>查询结果</h5>

                </div>
                <div class="ibox-content">

                    <div class="project-list">

                        <table class="table table-hover">
                            <tbody>
                            <tr ng-repeat="fault in faults">
                                <td class="project-status">
                                            <span class="label label-primary">进行中
                                </td>
                                <td class="project-title">
                                    <a ng-click="setFaultId(fault._id)" ng-bind="fault.title"></a>
                                    <br/>
                                    <small>发生于</small>  <small ng-bind="fault.occur_date.substr(0,10)"></small>
                                </td>
                                <td class="project-completion">
                                    <small>当前进度： {{ fault.progress * 100 }}%</small>
                                    <div class="progress progress-mini">
                                        <div style="width: {{ fault.progress *100 }}%;" class="progress-bar"></div>
                                    </div>
                                </td>
                                <td class="project-people">
                                    <!--<a href="projects.html"><img alt="image" class="img-circle" src="img/a3.jpg"></a>-->
                                    <!--<a href="projects.html"><img alt="image" class="img-circle" src="img/a1.jpg"></a>-->
                                    <!--<a href="projects.html"><img alt="image" class="img-circle" src="img/a2.jpg"></a>-->
                                    <!--<a href="projects.html"><img alt="image" class="img-circle" src="img/a4.jpg"></a>-->
                                    <!--<a href="projects.html"><img alt="image" class="img-circle" src="img/a5.jpg"></a>-->
                                    <span class="badge badge-primary" ng-show="fault.level == '较为严重' ">{{ fault.level }}</span>
                                    <span class="badge badge-danger" ng-show="fault.level == '严重' ">{{ fault.level }}</span>
                                    <span class="badge badge-danger" ng-show="fault.level == '非常严重' ">{{ fault.level }}</span>
                                    <span class="badge badge-primary" ng-show="fault.level == '轻微' ">{{ fault.level }}</span>
                    </div>
                    </td>
                    <td class="project-actions">
                        <!--<a href="project_detail.html#/{{ fault._id }}" class="btn btn-white btn-sm" ng-click="test()"><i class="fa fa-folder"></i> 查看 </a>-->
                        <a  class="btn btn-white btn-sm" ng-click="setFaultId(fault._id)"><i class="fa fa-folder"></i> 查看 </a>
                        <a  class="btn btn-white btn-sm" ng-click="editFault(fault._id)"><i class="fa fa-pencil" ></i> 编辑 </a>
                        <a   class="btn btn-white btn-sm" ng-click="uploadFaultImage(fault._id)" ><i class="fa fa-file-image-o" ></i> 上传 </a>
                        <a  class="btn btn-white btn-sm" ng-click="setFaultIdToDelete(fault._id,$index)" data-toggle="modal" data-target="#myModal"><i class="fa fa-remove"></i> 删除 </a>
                    </td>
                    </tr>




                    </tbody>
                    </table>




                    <!--<ul class="pagination" style="margin: 0px;">-->
                        <!--<li ng-class="{true:'disabled'}[p_current==1]"><a ng-click="p_index()">首页</a></li>-->
                        <!--<li ng-class="{true:'active'}[p_current==page]" ng-repeat="page in pages"><a  ng-click="load_page(page)">{{ page }}</a></li>-->
                        <!--<li ng-class="{true:'disabled'}[p_current==p_all_page]"><a ng-click="p_last()">尾页</a></li>-->
                    <!--</ul>-->
                    <!--<span style="vertical-align: 12px;">&nbsp;&nbsp;目前共：{{count}} 个维修项目</span>-->





                </div>
            </div>
        </div>
    </div>
</div>


<!-- 全局js -->
<script src="../js/jquery.min.js?v=2.1.4"></script>
<script src="../js/bootstrap.min.js?v=3.3.6"></script>


<!--jquery cookie-->
<script src="../js/js.cookie.js"></script>

<!-- 自定义js -->
<script src="../js/content.js?v=1.0.0"></script>



<!-- Jquery Validate -->
<script src="../js/plugins/validate/jquery.validate.min.js"></script>
<script src="../js/plugins/validate/messages_zh.min.js"></script>



<script>
    $(document).ready(function () {

    });
</script>


<!-- layerDate plugin javascript -->
<script src="../js/plugins/layer/laydate/laydate.js"></script>


<!--angular-->
<script src="//cdn.bootcss.com/angular.js/1.5.8/angular.js"></script>
<script src="//cdn.bootcss.com/angular.js/1.5.8/angular-cookies.js"></script>

<script type="text/javascript" src="../controllers/findController.js"></script>


</body>

</html>
